package com.one.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.one.entity.Stuaccount;
import com.one.service.StuaccountService;

@Controller
@RequestMapping("stuaccountController")
public class StuaccountController {
	@Resource
	private StuaccountService stuaccountService;
	@RequestMapping("oneout")
	public String oneout(Integer userId,HttpSession session,Model model){
		List<Stuaccount> oneout = stuaccountService.oneout(userId);
		model.addAttribute("oneout", oneout);
		return "Stuaccount";
		
	}
	/**
	 * 修改
	 * @param stuaccount
	 * @return
	 */
	@RequestMapping("updateStuacc")
	public String updateStuacc(Stuaccount stuaccount){
		stuaccountService.updateStuacc(stuaccount);
		return "redirect:/StuUserController/findOneStuUser.do";
		
	}
	
}
